<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
			<button @click="fn">btn</button>
		</view>
		<!-- <image :src="url" mode=""></image> -->
		<map v-if="show"></map>
		<Child />
		<button @click="jump">跳转到关于页</button>
	</view>
</template>

<script>
	import Child from "./components/Child.vue"
	
	export default {
		components: {
			Child
		},
		data() {
			return {
				title: 'Hello',
				// url: "https://img2.baidu.com/it/u=83788665,3052105123&fm=253&fmt=auto&app=138&f=JPEG?w=1082&h=416",
				show: false
			}
		},
		onLoad() {
			console.log("home onLoad");
		},
		mounted() {
			console.log("home mounted");
		},
		methods: {
			fn() {
				this.title = "WORLD"
			},
			jump() {
				uni.switchTab({
					url: "/pages/about/index"
				})
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
